﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace LbangCMS.ViewModels
{
    public class IndexProductListModel
    {
        public int CurrentPageIndex { get; set; }
        public int TotalPage { get; set; }

        public int CurrentCategoryId { get; set; }

        public string CurrentCategoryName { get; set; }

        public List<ProductModel> Products { get; set; }

        public List<ProductCategoryModel> Categories { get; set; }
        
    }

    public class ProductModel
    {

        //编号
        public int ID { get; set; }

        public int CategoryId { get; set; }
        //名称
        public string Name { get; set; }
        //图片
        public string ImageSrc { get; set; }
        //是否推荐
        public bool IsRecommend { get; set; }
        //是否发布
        public bool IsPublish { get; set; }
        //商品描述
        public string Description { get; set; }


    }

    public class ProductDetailModel
    {
        public List<ProductCategoryModel> Categories { get; set; }
        public ProductModel Product { get; set; }
        public List<ProductModel> RecommendProducts { get; set; }

        public List<ProductPropertyModel> Properties { get; set; }

        public int CurrentCategoryId { get; set; }

        public string CategoryName { get; set; }

    }

    public class ProductPropertyModel
    {
        //编号
        public int ID { get; set; }
        //名称
        public int ProductId { get; set; }
        //属性名
        public string PropertyName { get; set; }
        //属性值
        public string PropertyValue { get; set; }
        //排序号
        public int SortIndex { get; set; }
    }

    public class ProductCategoryModel
    {
        //编号
        public int ID { get; set; }
        //名称
        public string Name { get; set; }
        //排序号
        public int SortIndex { get; set; }
    }
}